<?php

@include_once("connect.php");

$res=[];
$id=$_GET['id'];

if($id){
  $sql="SELECT * FROM goods_list WHERE goods_id = $id";
  $a=mysqli_query($con,$sql);
  $arr=mysqli_fetch_array($a);
  if($arr){
    $res["status"]= true;
    $res["mag"]= '请求成功';
    $res["data"]= $arr;
  }else{
    $res["status"]= false;
    $res["mag"]= '数据库有误';
  }
}else{
   $res["status"]= false;
   $res["mag"]= '前端数据有误';
}
echo(json_encode($res,JSON_UNESCAPED_UNICODE));